package qsou.rpc.web.exampleserver.serviceimpl;

import lombok.extern.slf4j.Slf4j;
import qsou.rpc.framework.annotation.RpcService;
import qsou.rpc.service.hello.HelloDto;
import qsou.rpc.service.hello.HelloService;

@Slf4j
@RpcService(group = "test2", version = "version2")
public class HelloServiceImpl2 implements HelloService {

  static {
    System.out.println("HelloServiceImpl2被创建");
  }

  @Override
  public String hello(HelloDto hello) {
    log.info(this.getClass().getName() + " 收到: {}.", hello.getMessage());
    String result = "Hello description is " + hello.getDescription();
    log.info(this.getClass().getName() + " 返回: {}.", result);
    return result;
  }
}
